package com.health.model;

import java.util.Date;
/**
 * 用户实体类(包含权限,状态)
 * */
public class User {
	private String id;
	private String name;
	private String password;
	private String email;		
	private int gender;			//0男  1女
	private Date birthdate;		//用户生日(精确到日)
	private Date registertime;	//注册时间(精确到秒)
	private int permission;		//权限 0:admin 1:正常普通用户
	private int status;			//状态 0:正常 1禁用
	private Date startBirthdate;//查询条件 生日开始时间(范围)
	private Date endBirthdate;	//查询条件 生日结束时间(范围)
	
	/**
	 * constructors
	 * */
	public User() {}
	public User(String id, String name, String password, int gender, String email, Date birthdate, Date registertime, int permission, int status) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.gender = gender;
		this.email = email;
		this.birthdate = birthdate;
		this.registertime = registertime;
		this.permission = permission;
		this.status = status;
	}
	
	@Override
	public String toString() {
		return this.id + " " + name + " " + password + " " + 
					gender + " " + birthdate.toString() +" " + registertime.toString() +
					permission + " " + status;
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getGender() {
		return gender;
	}
	public void setGender(int gender) {
		this.gender = gender;
	}
	public Date getBirthdate() {
		return birthdate;
	}
	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}
	public Date getRegistertime() {
		return registertime;
	}
	public void setRegistertime(Date registertime) {
		this.registertime = registertime;
	}
	public int getPermission() {
		return permission;
	}
	public void setPermission(int permission) {
		this.permission = permission;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Date getStartBirthdate() {
		return startBirthdate;
	}
	public void setStartBirthdate(Date startBirthdate) {
		this.startBirthdate = startBirthdate;
	}
	public Date getEndBirthdate() {
		return endBirthdate;
	}
	public void setEndBirthdate(Date endBirthdate) {
		this.endBirthdate = endBirthdate;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
}
